From: Florian Müllner Date: Wed, 21 Feb 2018 11:28:20 +0000 (+0100) Subject: tests: Fix import error in calendar X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~994^2^2~7 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=23d6c4dcc007f17059728cbdcbd401cf0dc07705;p=gnome-shell.git tests: Fix import error in calendar The Calendar module requires C_ at import time, which is only available after Environment.init() has been called. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/38 --- diff --git a/tests/interactive/calendar.js b/tests/interactive/calendar.js index a54b562d5..f2a70bb72 100644 --- a/tests/interactive/calendar.js +++ b/tests/interactive/calendar.js @@ -6,8 +6,6 @@ const Clutter = imports.gi.Clutter; const Lang = imports.lang; const St = imports.gi.St; -const Calendar = imports.ui.calendar; - function test() { let stage = new Clutter.Stage({ width: 400, height: 400 }); UI.init(stage); @@ -18,6 +16,8 @@ function test() { style: 'padding: 10px; spacing: 10px; font: 15px sans-serif;' }); stage.add_actor(vbox); + // Calendar can only be imported after Environment.init() + const Calendar = imports.ui.calendar; let calendar = new Calendar.Calendar(); vbox.add(calendar.actor, { expand: true,